package com.example.travelservlet.commentEntertainment.dao;

import com.example.travelservlet.entity.Comment;
import com.example.travelservlet.entity.Like;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.data.domain.Page;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @author hxy
 * @date 2023/5/16 9:04
 */
@Mapper
@Repository
public interface CommentMapper {

    Integer insertComment(Comment comment);

    List<Comment> findCommentByEntertainmentId(String entertainmentId);
    
    Comment findCommentById(String id);

    void deleteCommentById(String id);

    List<Comment> findCommentByKeyWord(@Param("key") String key);

    List<Comment> findAllEntertainmentComments();
    List<Comment> findAllEntertainmentComments1(int page,int size);

    List<Comment> selectByEntertainment(@Param("key")String key);

    List<Comment> selectByEntertainment1(@Param("key")String key,@Param("page")Integer page,@Param("size") Integer size);

    List<Comment> findCommentByKeyWord1(@Param("key")String key,@Param("page")Integer page,@Param("size") Integer size);
}
